import { derived } from 'svelte/store';
import { page } from '$app/stores';

export interface Product {
	name: string;
	solutionPage: string;
}

const _products: Product[] = [
	{
		name: '群小程序',
		solutionPage: '/solution/group'
	},
	{
		name: '商城小程序',
		solutionPage: '/solution/mall'
	}
];

export const product = derived(page, ($page, set: (v: Product) => void) => {
	set(_products.find((i) => i.solutionPage === $page.path));
});
